package app.config;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *
 * @author Kseniya Artsiukhova <kartsiukhova@productiveedge.com>
 */
public class ContextLoadListener implements ServletContextListener {
    
    static final Logger logger = LoggerFactory.getLogger(ContextLoadListener.class);
    
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        initActiveJDBC();
    }

    private void initActiveJDBC() {
        /*
        try {
            Base.open("jdbc/library");
        } catch (Exception ex) {
            logger.error("ActiveJDBC initialization on startup failed", ex);
        } finally {
            Base.close();
        }
        */
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
    }
}
